package net;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.Scanner;

public class NetClient {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1",8080);

        OutputStream outputStream = socket.getOutputStream();
        System.out.println(outputStream.getClass().getName());

        Scanner scanner = new Scanner(System.in);

        while (true){
            int x = scanner.nextInt();
            outputStream.write(x);

            if (x == 0){
                break;
            }
        }


    }
}
